package cn.lyf.myblog.mybatis.mappers;

import java.util.*;

import cn.lyf.myblog.mybatis.entity.Blog;

public interface BlogMapper {
    int insertBlog(Blog blog);

    int deleteBlog(int bid);

    Blog selectById(int bid);

    /* List<Blog> selectByUid(int uid); */

    List<Blog> selectBlogLately(int uid, int limit, int offset);

    int updateBlogNotNull(Blog blog);

    // SELECT DATE_FORMAT(date,'%Y') year_time,count(bid) total FROM `blog` where
    // uid=1 GROUP BY year_time;
    List<Map<String, Object>> selectByYearAndUid(Integer uid);

    List<Blog> selectByYear(Integer year);

    int selectSumByUid(int uid);

    List<Blog> seletByTagsAndTitle(String title, List<String> list);
}
